//
//  XLUpDownButton.swift
//  个人微博
//
//  Created by guo3920591 on 16/4/25.
//  Copyright © 2016年 guo3920591. All rights reserved.
//

import UIKit

class XLUpDownButton: UIButton {
    /// 重写高亮方法
    override var highlighted: Bool{
        
        get{
            
            return false
        }
        
        set{
            
            
        }
        
    }
    
    
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        //设置界面
        setupUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    // MARK: - 私有控件
    
    
    
}
// MARK: - 设置界面
extension XLUpDownButton{
    
    private func setupUI(){
        
       titleLabel?.font = UIFont.systemFontOfSize(14)
        
       titleLabel?.textAlignment = .Center
        
        
    }

  
    
    override func layoutSubviews() {
        
        super.layoutSubviews()
        
        self.imageView?.frame = CGRect(x: 0, y: 0, width: self.frame.size.width, height: self.frame.size.width)
        
        self.titleLabel?.frame = CGRect(x: 0, y: self.frame.size.width, width: self.frame.size.width, height: self.frame.size.height-self.frame.size.width)
        
        
    }
    
    

}
